package cn.ecut.services;

import cn.ecut.dao.ContentDao;
import cn.ecut.model.Content;
import cn.ecut.model.Discuss;

import java.sql.Timestamp;
import java.util.List;

public class ContentServices {
    private ContentDao cd = new ContentDao() ;
    //private DiscussDao dd = new DiscussDao() ;
    public boolean addContent(Content c) {

        // 调用DAO ，将其添加到数据库中
        return cd.addContent( c ) ;
    }

    public List<Content> list( Integer begin) {
        return cd.list( begin) ;
    }

    /*public Content loadById(Integer id ) {
        // 期望看到评论
        List<Discuss> discusses = dd.loadDiscussesByContentId(id);
        content.setDiscussList( discusses );
        return content  ;
    }*/


}
